package fr.alesia.capital.bean.comparator;

import java.util.Comparator;

import fr.alesia.capital.bean.Pays;

public class CapitaleComparator implements Comparator<Pays> {
	
	private static Comparator<Pays> instance = null;
	
	private CapitaleComparator(){}
	
	public static Comparator<Pays> getComparator(){
		if(instance == null){
			instance = new CapitaleComparator();
		}
		return instance;
	}

	public int compare(Pays one, Pays two) {
			
		return one.getCapitale().toUpperCase().compareTo(two.getCapitale().toUpperCase());
	}
}
